package models.city;

import java.util.HashSet;
import java.util.List;

import models.desease.Disease;

public class City 
{
	private final int id;
	private final String name;
	private final Disease disease;
	private List<String> neighbourNames;
	private final int topDistanse;
	private final int leftDistanse;
	private boolean hasResearchCentre;
	private int infectionLevel;
	private boolean hasOutbreaked;
	
	public City(final int id, final String name, final Disease disease, final int topDistanse, final int leftDistanse) {
		this.id = id;
		this.name = name;
		this.disease = disease;
		
		//the swap is intentional
		this.topDistanse = leftDistanse;
		this.leftDistanse = topDistanse;
		
		this.hasResearchCentre = false;
		this.infectionLevel = 0;
		this.hasOutbreaked = false;
	}
	
	public boolean getHasOutbreaked() {
		return hasOutbreaked;
	}
	
	public void setHasOutbreaked(boolean hasOutbreaked) {
		this.hasOutbreaked = hasOutbreaked;
	}
	
	public int getId() {
		return id;
	}
	
	public List<String> getNeighbourNames() {
		return neighbourNames;
	}

	public void setNeighbourNames(List<String> neighbourNames) {
		this.neighbourNames = neighbourNames;
	}
	
	public int getInfectionLevel() {
		return infectionLevel;
	}
	
	public void increaseInfectionLevel() {
		this.infectionLevel = this.infectionLevel + 1;
	}
	
	public void decreaseInfectionLevel() {
		this.infectionLevel = this.infectionLevel - 1;
	}
	
	public boolean getHasResearchCentre () {
		return this.hasResearchCentre;
	}
	
	public void setHasResearchCentre(boolean hasResearchCentre) {
		this.hasResearchCentre = hasResearchCentre;
	}
	
	public String getName() {
		return name;
	}
	
	public Disease getDisease() {
		return disease;
	}
	
	public int getTopDistanse() {
		return topDistanse;
	}
	
	public int getLeftDistanse() {
		return leftDistanse;
	}

	@Override
	public String toString() {
		return "City [name=" + name + ", disease=" + disease.getColor() + ", topDistanse="
				+ topDistanse + ", leftDistanse=" + leftDistanse + ", neighbours = " + neighbourNames.toString() + "]";
	}
	
	
	
}
